package com.easy.service.impl;

import com.easy.bean.Orderinfo;
import com.easy.dao.OrderinfoDao;
import com.easy.service.IOrderinfoService;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
@Service
public class OrderinfoService implements IOrderinfoService {

    @Autowired
    OrderinfoDao orderinfoDao;

    @Override
    public int add(Orderinfo orderinfo) {
        return orderinfoDao.add(orderinfo);
    }

    @Override
    public int edit(Orderinfo orderinfo) {
        return orderinfoDao.edit(orderinfo);
    }

    @Override
    public int delete(int orderinfoid) {
        return orderinfoDao.delete(orderinfoid);
    }

    @Override
    public List<Orderinfo> getList(Page page, String text,int orderid) {
        return orderinfoDao.getList(page, text,orderid);
    }

    @Override
    public Orderinfo getOrderinfoById(int orderinfoid) {
        return orderinfoDao.getOrderinfoById(orderinfoid);
    }

    @Override
    public int getCount(String text) {
        return orderinfoDao.getCount(text);
    }
}
